import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useWebsiteStore = defineStore('website', () => {
  const activeIndex = ref('/')

  const changeActiveIndex = (index) => {
    activeIndex.value = index
  }
  const getActiveIndex = computed(() => {
    return activeIndex.value
  })
  return { activeIndex, changeActiveIndex,getActiveIndex }
},
{
    persist: {
      enabled: true,
      strategies: [
        {
          key: 'website',
          storage: localStorage,
        },
      ],
    },
})
